We use the high-level gdk_device_get_window_at_position() to figure
out the window, although this one actually tries to find out the
current window under the device coordinates, which might well fall
outside the window, so NULL is returned in those cases.
Fix this by using the lower level _gdk_device_window_at_position()
that will return the toplevel without further lookups, so is more
desirable here.
https://bugzilla.gnome.org/show_bug.cgi?id=758250
#include "gdkprivate-wayland.h"
#include "gdkdisplay-wayland.h"
+#include "gdkdeviceprivate.h"
+
#include <string.h>
#define GDK_TYPE_WAYLAND_DRAG_CONTEXT (gdk_wayland_drag_context_get_type ())
GdkWindow *toplevel;
GList *l;
- toplevel = gdk_device_get_window_at_position (device, NULL, NULL);
+ toplevel = _gdk_device_window_at_position (device, NULL, NULL, NULL, TRUE);
context_wayland = g_object_new (GDK_TYPE_WAYLAND_DRAG_CONTEXT, NULL);
context = GDK_DRAG_CONTEXT (context_wayland);